package com.meritdata.cloud.data.standard.directory.entity;

import org.hibernate.annotations.GenericGenerator;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 数据域表
 * 
 * @author Lee
 *
 */
@Entity
@Table(name = "TD_DATA_DOMAIN")
public class TdDataDomain {

	// ID
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private long id;

	// 归属层ID
	@Column(name = "LAYER_ID")
	private Long layerId;

	// 归属域ID
	@Column(name = "DOMAIN_ID")
	private Long domainId;

	// 域编码
	@Column(name = "CODE")
	private String code;

	// 域名称
	@Column(name = "NAME")
	private String name;

	// 域描述
	@Column(name = "DESCRIPTION", length = 2000)
	private String description;

	// 创建时间
	@Column(name = "CREATE_TIME")
	private Date createTime;

	// 修改时间
	@Column(name = "UPDATE_TIME")
	private Date updateTime;

	// 创建人ID
	@Column(name = "CREATOR")
	private String creator;

	// 修改人ID
	@Column(name = "REVISER_ID")
	private String reviserId;

	@Transient
	private String type = "domain";

	@Transient
	private List<Object> children;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Long getLayerId() {
		return layerId;
	}

	public void setLayerId(Long layerId) {
		this.layerId = layerId;
	}

	public Long getDomainId() {
		return domainId;
	}

	public void setDomainId(Long domainId) {
		this.domainId = domainId;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getReviserId() {
		return reviserId;
	}

	public void setReviserId(String reviserId) {
		this.reviserId = reviserId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<Object> getChildren() {
		return children;
	}

	public void setChildren(List<Object> children) {
		this.children = children;
	}

}